package com.vietnam.power.dao;

import java.util.List;

import com.vietnam.power.domain.ProductSearchDTO;
import com.vietnam.power.persistence.Category;
import com.vietnam.power.persistence.Product;

public interface ProductDao {
	
	/**
	 * Search product list by criterias
	 * @param searchDTO
	 * @return
	 */
	public List<Product> getProductByCriteria(ProductSearchDTO searchDTO);
	/**
	 * count number of products by criteria for pagination 
	 * @param searchDTO
	 * @return
	 */
	public Long countProductsByCriteria(ProductSearchDTO searchDTO);
	/**
	 * get product by primary key
	 * @param id
	 * @return
	 */
	public Product getProductById(Long id);
	
	/**
	 * Get all category
	 * @return category list
	 */
	public List<Category> getAllParentCategories();
	/**
	 * get all children categories
	 * @param parentId
	 * @return active categories
	 */
	public List<Category> getAllChildrenCategories(Long parentId);
}
